#include <vector>
#include <stdio.h>
#include <iostream>
#include <string>
#include <fstream> 



#include <math.h> 
#define M_PI 3.14159265358979323846 

#pragma once

using namespace std;

class PointTraj
{
	//y
	long double latitude;
	//x
	long double longitude;
	//z
	long double altitude;
	//t
	long double timestamp;
public:
	PointTraj(long double latitude, long double longitude, long double altitude, long double timestamp);
	~PointTraj(void);
	
	inline long double getLatitude() { return latitude;}
	inline long double getLongitude() { return longitude;}
	inline long double getAltitude() { return altitude;}
	inline long double getTimestamp() { return timestamp;}
	
	inline void setLatitude(long double latitude) {	this->latitude = latitude;}
	inline void setLongitude(long double longitude) {	this->longitude = longitude;}
	inline void setAltitude(long double altitude) {	this->altitude = altitude;}
	inline void setTimestamp(long double timestamp) {	this->timestamp = timestamp;}
};

class Trajectory
{

	vector<PointTraj> points;

public:
	Trajectory(const char* file);
	~Trajectory(void);


	inline vector<PointTraj> getPoints() { return points;}
	
	inline void setPoint(vector<PointTraj> points) {	this->points = points;}

	void addPointTraj(PointTraj p);

	long double distance2Points(PointTraj p1, PointTraj p2);

	PointTraj makeMiddlePoint(PointTraj p1, PointTraj p2);
	void interpolation2Points(vector<PointTraj> *vect, PointTraj p1, PointTraj p2);

	void printDistPoints();


};
